#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Element.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ParameterableElement;
class TemplateSignature;

/// <summary>
/// TemplateParameter
/// A TemplateParameter exposes a ParameterableElement as a formal parameter of a
/// template.
/// </summary>
class UMLMODEL_EXPORT TemplateParameter : public Element {

public: // Constructors and destructors
    explicit TemplateParameter(const QString& umlType="uml::TemplateParameter");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// default2 getter
    /// The ParameterableElement that is the default for this formal TemplateParameter.
    /// </summary>
    shared_ptr<ParameterableElement> default2() const;

    /// <summary>
    /// default2 setter
    /// The ParameterableElement that is the default for this formal TemplateParameter.
    /// </summary>
    void setDefault2(shared_ptr<ParameterableElement> value);

    /// <summary>
    /// ownedDefault getter
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of providing a default.
    /// </summary>
    shared_ptr<ParameterableElement> ownedDefault() const;

    /// <summary>
    /// ownedDefault setter
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of providing a default.
    /// </summary>
    void setOwnedDefault(shared_ptr<ParameterableElement> value);

    /// <summary>
    /// ownedParameteredElement getter
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of exposing it as the parameteredElement.
    /// </summary>
    shared_ptr<ParameterableElement> ownedParameteredElement() const;

    /// <summary>
    /// ownedParameteredElement setter
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of exposing it as the parameteredElement.
    /// </summary>
    void setOwnedParameteredElement(shared_ptr<ParameterableElement> value);

    /// <summary>
    /// parameteredElement getter
    /// The ParameterableElement exposed by this TemplateParameter.
    /// </summary>
    shared_ptr<ParameterableElement> parameteredElement() const;

    /// <summary>
    /// parameteredElement setter
    /// The ParameterableElement exposed by this TemplateParameter.
    /// </summary>
    void setParameteredElement(shared_ptr<ParameterableElement> value);

    /// <summary>
    /// signature getter
    /// The TemplateSignature that owns this TemplateParameter.
    /// </summary>
    shared_ptr<TemplateSignature> signature() const;

    /// <summary>
    /// signature setter
    /// The TemplateSignature that owns this TemplateParameter.
    /// </summary>
    void setSignature(shared_ptr<TemplateSignature> value);

private: // Fields
    /// <summary>
    /// default2
    /// The ParameterableElement that is the default for this formal TemplateParameter.
    /// </summary>
    shared_ptr<ParameterableElement> default2_;

    /// <summary>
    /// ownedDefault
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of providing a default.
    /// </summary>
    shared_ptr<ParameterableElement> ownedDefault_;

    /// <summary>
    /// ownedParameteredElement
    /// The ParameterableElement that is owned by this TemplateParameter for the purpose
    /// of exposing it as the parameteredElement.
    /// </summary>
    shared_ptr<ParameterableElement> ownedParameteredElement_;

    /// <summary>
    /// parameteredElement
    /// The ParameterableElement exposed by this TemplateParameter.
    /// </summary>
    shared_ptr<ParameterableElement> parameteredElement_;

    /// <summary>
    /// signature
    /// The TemplateSignature that owns this TemplateParameter.
    /// </summary>
    shared_ptr<TemplateSignature> signature_;

};

} // namespace uml
